package com.CST.dto.cb;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p></p>
 *
 * @author: y
 * @create: 2021-10-13 10:33
 **/
@Data
public class UserMenuDTO {

    @TableId("ID")
    private String id;

    @ApiModelProperty(value = "父id")
    @TableField("PARENT_ID")
    private String parentId;


    @ApiModelProperty(value = "用户名")
    @TableField("USER_NAME")
    private String userName;

    @ApiModelProperty(value = "角色id")
    @TableField("ROLE_ID")
    private String roleId;


    @ApiModelProperty(value = "菜单名称")
    @TableField("MENU_NAME")
    private String menuName;

    @ApiModelProperty(value = "创建时间",example = "2020-02-05 13:30:41")
    @TableField("CREATE_TIME")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    private Date createTime;

    @ApiModelProperty(value = "更新时间",example = "2020-02-05 13:30:41")
    @TableField("UPDATE_TIME")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    private Date updateTime;

    @TableField("DEL_FLAG")
    private String delFlag;

    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<UserMenuDTO> children =new ArrayList<>();

}
